package app.auto.runner.base.utility;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class AlphabetUtil {
    public static String get() {
        return getPrivate();
    }

    private static String getPrivate() {
        Random rand = new Random(47);
        int c = rand.nextInt(26) + 'a';
        return new Character((char) c).toString();
    }

    public static String getRandom() {
        return getRandomPrivate();
    }

    private static String getRandomPrivate() {
        SimpleDateFormat simpleDateFormat;
        simpleDateFormat = new SimpleDateFormat("yyMMdd");
        String date = simpleDateFormat.format(new Date());
        Random random = new Random();
        int rannum = (int) (random.nextDouble() * (99999 - 10000 + 1)) + 10000;
        // System.out.println(rannum);
        String rand = date + rannum;
        return rand;
    }

    public static String getrandomId() {
        return get() + getRandom() + "";
    }
}
